﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Orange.Mvc4App.Infrastructure
{
    /// <summary>
    /// 数据缓存类
    /// </summary>
    public class DataCache
    {
        /// <summary>
        /// 获取缓存
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public object GetCache(string key)
        {
            return HttpRuntime.Cache[key];
        }

        /// <summary>
        /// 设置缓存
        /// </summary>
        /// <param name="key"></param>
        /// <param name="obj"></param>
        public void SetCache(string key, object obj)
        {
            HttpRuntime.Cache[key] = obj;
        }
    }
}